package cn.ac.siom.query.dao.impl;

import cn.ac.siom.query.dao.ITabWeblibMapper;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2018/8/14 0014.
 */
@Repository
public class TabWeblibMapperImpl extends SqlSessionDaoSupport implements ITabWeblibMapper {

    @Autowired
    public TabWeblibMapperImpl(SqlSessionFactory sqlSessionFactory){
        super.setSqlSessionFactory(sqlSessionFactory);
    }

    @Override
    public List<Map> selectWeblib(Map params) throws Exception {
        return super.getSqlSession().selectList("cn.ac.siom.query.dao.TabWeblibMapper.selectWeblib",params);
    }

    @Override
    public Integer selectCount(Map params) throws Exception {
        return super.getSqlSession().selectOne("cn.ac.siom.query.dao.TabWeblibMapper.selectCount",params);
    }
}
